var pixelRatio = 1 / window.devicePixelRatio;
//通过js动态设置视口(viewport)
document.write('<meta name="viewport" content="width=device-width,initial-scale='+pixelRatio+',minimum-scale='+pixelRatio+',maximum-scale='+pixelRatio+'" />');
function setSize(){
	var html = document.getElementsByTagName('html')[0];
	// 获取屏幕宽度
	var pageWidth = html.getBoundingClientRect().width;
	// 屏幕宽度 / 固定数值 = 基准值
	html.style.fontSize = pageWidth / 10 + "px";
}
setSize();
window.addEventListener("resize",setSize,false);
window.addEventListener("orientationchange",setSize, false);